class Rhombus
{
	double d1;
	double d2;
	double s; 
	
	public Rhombus (double d1, double d2)
	{
		this.d1=d1;
		this.d2=d2;
	}
	
	public Rhombus (double s)
	{
		this.s=s;
	}
	
	public double getArea()
	{
		double area= (d1 * d2)/2;
		return area;
	}
	
	public double getPerimeter()
	{
		double perimeter=4 * s;
		return perimeter;
	}
	
	public double getPerimeter2()
	{
		d1=d1/2;
		d2=d2/2;
		double s=Math.sqrt (Math.pow(d1,2) + Math.pow (d2,2));
		double perimeter= 4 * s;
		return perimeter;
	}
}